home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 356 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.8 KB

  1. Path: chronicle.mti.sgi.com!austern
  2. From: JdeBP@jba.co.uk (Jonathan de Boyne Pollard)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: #ifdef XXXX
  5. Date: 12 Feb 1996 12:54:00 PST
  6. Organization: JBA Software Products, Studley, England.
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4fo5ih$som@silver.jba.co.uk>
  9. References: <1996Feb1.092058.4745@iiasa.ac.at> <4fe1jt$scn@hermes.acs.unt.edu>
  10. Reply-To: JdeBP@donor2.demon.co.uk
  11. NNTP-Posting-Host: isolde.mti.sgi.com
  12. X-Original-Date: 12 Feb 1996 19:48:33 -0000
  13. X-Newsreader: TIN [version 1.2 PL2]
  14. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  15.     iQBVAwUBMR+o9ky4NqrwXLNJAQGHoQH/WnR7b8P0YxmNNo9THpvdJATcy/vYRzjh
  16.     tKHP3uJPTggIZxKHOn5pXxakoaL+UQJGoKvK56uQBXZHcFLkYFBrCQ==
  17.     =RGbw
  18. Originator: austern@isolde.mti.sgi.com
  19.  
  20. John R. Williams (johnw@jove.acs.unt.edu) wrote:
  21. | I think it would be even better to make "#pragma once" (a common C 
  22. | extension, AFAIK) into a standardized directive ("#once"?). This would 
  23. | probably save an average of 30 characters per header (the most annoying 
  24. | ones in the whole language(s), IMO).
  25.  
  26. At least one C++ compiler vendor (MetaWare) implements #c_include, which
  27. has the same semantics as #include, except that it is ignored the second
  28. and subsequent times that it is encountered for the same file.
  29.  
  30. | Also something I have often wished for was something like #warning which 
  31. | would cause the compiler to emit a warning.
  32.  
  33. Coincidentally, the same compiler vendor provides #print.  It's quite
  34. useful, actually.
  35.  
  36. As I've said before, many features that people so often find desirable are
  37. actually already implemented by compiler vendors.  Vote with your wallets.
  38. ---
  39. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  40.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy is
  41.   in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
  42.